package domain.domain;

import java.util.ArrayList;

public class StudentList {
    public static void main(String[] args) {
        ArrayList<Student> sl=new ArrayList<>();
        Student stu1=new Student("张三",22);
        Student stu2=new Student("王五",23);
        Student stu3=new Student("李成",26);
        sl.add(stu1);
        sl.add(stu2);
        sl.add(stu3);
        for (int i = 0; i < sl.size(); i++) {
            System.out.println(sl.get(i).getName()+"..."+sl.get(i).getAge());
        }
    }
}
